import Vue from 'vue'
import Vuex from 'vuex'

import example from './module-example'
import user from './user'
import nav from './nav'
import tags from './tags'
import tagsView from './tagsView'
import loading from './loading'
import axios from './common/axios'
import router from './router/router'
import chat from './chat'

Vue.use(Vuex)

/*
 * If not building with SSR mode, you can
 * directly export the Store instantiation
 */

export default function (/* { ssrContext } */) {
  const Store = new Vuex.Store({
    modules: {
      example,
      user,
      nav,
      tags,
      loading,
      tagsView,
      axios,
      router,
      chat
    }
  })

  return Store
}
